package com.uairobot.bill.yz.office.agent.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.uairobot.bill.yz.office.agent.comp.ResourcesLocationComponent;

/**
 * @author bill robot
 * @date 2020年1月3日_下午5:00:09 
 * @version 1.0 
 * @desc
 */
@RestController
@RequestMapping("spring")
public class SpringController {
  @Autowired
  private ResourcesLocationComponent rlc;

  @RequestMapping("locations")
  public Map<String, Object> locations() {
    List<String> locations = rlc.getLocations();
    HashMap<String, Object> hashMap = new HashMap<>();
    hashMap.put("locations", locations);
    return hashMap;
  }

}
